Optimal. Leaf size=23 \[ \frac{1}{2 (a \cos (x)+a)}-\frac{\tanh ^{-1}(\cos (x))}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0495032, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {2667, 44, 206} \[ \frac{1}{2 (a \cos (x)+a)}-\frac{\tanh ^{-1}(\cos (x))}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2667
Rule 44
Rule 206
Rubi steps
\begin{align*} \int \frac{\csc (x)}{a+a \cos (x)} \, dx &=-\left (a \operatorname{Subst}\left (\int \frac{1}{(a-x) (a+x)^2} \, dx,x,a \cos (x)\right )\right )\\ &=-\left (a \operatorname{Subst}\left (\int \left (\frac{1}{2 a (a+x)^2}+\frac{1}{2 a \left (a^2-x^2\right )}\right ) \, dx,x,a \cos (x)\right )\right )\\ &=\frac{1}{2 (a+a \cos (x))}-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{a^2-x^2} \, dx,x,a \cos (x)\right )\\ &=-\frac{\tanh ^{-1}(\cos (x))}{2 a}+\frac{1}{2 (a+a \cos (x))}\\ \end{align*}
Mathematica [A] time = 0.0313792, size = 42, normalized size = 1.83 \[ \frac{1-2 \cos ^2\left (\frac{x}{2}\right ) \left (\log \left (\cos \left (\frac{x}{2}\right )\right )-\log \left (\sin \left (\frac{x}{2}\right )\right )\right )}{2 a (\cos (x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 33, normalized size = 1.4 \begin{align*}{\frac{\ln \left ( -1+\cos \left ( x \right ) \right ) }{4\,a}}+{\frac{1}{2\,a \left ( \cos \left ( x \right ) +1 \right ) }}-{\frac{\ln \left ( \cos \left ( x \right ) +1 \right ) }{4\,a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.13465, size = 42, normalized size = 1.83 \begin{align*} -\frac{\log \left (\cos \left (x\right ) + 1\right )}{4 \, a} + \frac{\log \left (\cos \left (x\right ) - 1\right )}{4 \, a} + \frac{1}{2 \,{\left (a \cos \left (x\right ) + a\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.66671, size = 135, normalized size = 5.87 \begin{align*} -\frac{{\left (\cos \left (x\right ) + 1\right )} \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) -{\left (\cos \left (x\right ) + 1\right )} \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - 2}{4 \,{\left (a \cos \left (x\right ) + a\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\csc{\left (x \right )}}{\cos{\left (x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11544, size = 46, normalized size = 2. \begin{align*} -\frac{\log \left (\cos \left (x\right ) + 1\right )}{4 \, a} + \frac{\log \left (-\cos \left (x\right ) + 1\right )}{4 \, a} + \frac{1}{2 \, a{\left (\cos \left (x\right ) + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]